package com.person.mall.enums;

import lombok.Getter;

/**
 * @author 最酷的桃儿wjc
 * * @date 2022/5/14
 */
@Getter
public enum ResponseEnum {

    ERROR(-1,"服务端错误"),

    SUCCESS(0,"成功"),

    PASSWORD_ERROR(1,"密码错误"),

    USERNAME_EXIST(2,"用户名已经存在"),

    PARAM_ERROR(3,"参数错误"),

    EXMAIL_EXIST(4,"邮箱已经存在"),

    NEED_LOGIN(10,"用户未登录请先登录"),

    USERNAME_OR_PASSWORD_ERROR(11,"用户名或者密码错误"),

    PRODUCT_OFF_ERROR(12,"商品下架或删除"),

    PRODUCT_STOCK_ERROR(13,"商品库存不足"),

    INSERT_SHIPPING_ERROR(20,"新建地址失败"),

    INSERT_SHIPPING_SUCCESS(21,"新建地址成功"),

    DELETE_SHIPPING_ERROR(30,"删除地址失败"),

    DELETE_SHIPPING_SUCCESS(31,"删除地址成功"),

    UPDATE_SHIPPING_ERROR(40,"更新地址失败"),

    UPDATE_SHIPPING_SUCCESS(41,"更新地址成功"),

    SHIPPING_NOT_EXITS(42,"地址不存在"),

    CART_SELECT_IS_EMPTY(18,"请选择商品后下单"),
    ORDER_ERROR(19,"失败")
    ;

    Integer code;

    String desc;

    ResponseEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
